<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>测试设备信息</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
</head>
<body>
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"&gt;
  <script type="text/javascript">
    var clientWidth = document.body.clientWidth;
    $("body").append('<div>网页可见区域宽:'+clientWidth+'</div>');
    var offsetWidth = document.body.offsetWidth;
    $("body").append('<div>网页可见区域宽(包括边线):'+offsetWidth+'</div>');
    var screenWidth = window.screen.width;
    $("body").append('<div>屏幕分辨率宽:'+screenWidth+'</div>');
    var dpr = window.devicePixelRatio;
    $("body").append('<div>dpr:'+dpr+'</div>');
  </script>
</body>
</html>